package com.alibaba.algo.dao.user;

import com.alibaba.algo.cooperation.usercomponent.vo.res.user.EmployeeInfo;
import com.alibaba.algo.cooperation.usercomponent.vo.res.user.OrgGroupVO;
import com.alibaba.algo.core.base.BaseMapper;
import com.alibaba.algo.dtos.user.EmployeeUserOrgDTO;
import com.alibaba.algo.entity.user.SysEmployeeGroup;
import com.alibaba.algo.entity.user.SysGroup;
import com.alibaba.algo.entity.user.SysOrgGroup;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface SysOrgGroupMapper extends BaseMapper<SysOrgGroup> {

    void batchInsert(@Param("sysOrgGroupList") List<SysOrgGroup> sysOrgGroupList);

    List<OrgGroupVO> selectOrgIdListByGroupId(@Param("groupId") Long groupId);

    List<EmployeeInfo> selectEmployeeListByOrgIdList(@Param("orgIdList") List<Long> orgIdList);

    List<EmployeeInfo> selectEmployeeListByOrgIdsAndEmployeeUser(@Param("obj") EmployeeUserOrgDTO employeeUserOrgDTO);

    Integer countEmployeeListByOrgIds(@Param("obj") EmployeeUserOrgDTO employeeUserOrgDTO);

    List<SysOrgGroup> selectByOrgIdList(@Param("orgIdList") List<Long> orgIdList);

    void deleteByGroupId(@Param("groupId") Long groupId);

    List<SysGroup> selectGroupListByOrgIdList(@Param("orgIdList") List<Long> orgIdList);

    Integer updateByOrgIdGroupId(@Param("obj") SysOrgGroup sysOrgGroup);

    List<SysOrgGroup> selectOrgGroupListByGroupIds(@Param("ids") List<Long> groupIdList, @Param("isDeleted") String isDeleted);
}
